<?php
namespace App\Service;
use App\Http\Controllers\Controller;
use App\Model\GoodsModel;
class GoodsService extends  Controller
{
     private $goodsModel;
    public  function __construct(GoodsModel $goodsModel)
    {
         $this->goodsModel=$goodsModel;
    }
    public function showPage($offset,$pageSize)
    {
          return $this->goodsModel->limit($pageSize)->offset($offset)->get();
    }
    public function showCount()
    {
        return $this->goodsModel->count();
    }
}
